package com.StephenHu.util;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @author steph
 * @time  2024.6.10
 */
@Aspect
@Component
public class myUtil {
    JoinPoint jp ;

    @Before("execution(* com.StephenHu.service.impl.*.*(..))")
    public void methodBegin(JoinPoint jp){
        System.out.println(jp.getSignature().getName()+"方法开始");
    }
    @After("execution(* com.StephenHu.service.impl.*.*(..))")
    public void methodEnd(){
        System.out.println("方法结束");
    }
}
